package com.yunhe.inspect.model;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.yunhe.common.annotation.NameTitle;
import com.yunhe.inspect.domain.InspectProcess;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;

/**
 * @ClassName DataInspectOrderDetailVo
 * @Description TODO
 * @Author HeTao
 * @Date 2021/11/11 13:27
 * @Version 1.0
 **/
@Data
@ApiModel("工单详情出参对象")
public class DataInspectOrderDetailVo {

    /**
     * 工单id
     */
    @ApiModelProperty("工单id")
    private Integer id;

    /**
     * 虚拟园区id
     */
    @ApiModelProperty("虚拟园区id")
    private Long stationId;

    /**
     * 巡检工单标题
     */
    @ApiModelProperty("巡检工单标题")
    private String inspectOrderTitle;

    /**
     * 巡检工单编号
     */
    @ApiModelProperty("巡检工单编号")
    private String inspectOrderNo;

    /**
     * 巡检计划id
     */
    @ApiModelProperty("巡检计划id")
    private Long inspectPlanId;

    /**
     * 所属部门
     */
    @ApiModelProperty("所属部门")
    private Long orgId;

    @ApiModelProperty("所属部门名称")
    @NameTitle(nameType = "ORG",nameCode = "orgId")
    private String orgName;

    /**
     * 企业id
     */
    @ApiModelProperty("企业id")
    private Long companyId;

    /**
     * 企业名称
     */
    @ApiModelProperty("企业名称")
    private String companyName;

    /**
     * 房源id
     */
    @ApiModelProperty("房源id")
    private Long officeId;

    /**
     * 房源名称
     */
    @ApiModelProperty("房源名称")
    private String officeName;

    /**
     * 巡检类型
     */
    @ApiModelProperty("巡检类型")
    private String inspectType;

    @ApiModelProperty("巡检类型title")
    @NameTitle(nameType = "ITEM",nameCode = "inspectType")
    private String inspectTypeTitle;

    /**
     * 巡检状态
     */
    @ApiModelProperty("巡检状态")
    private String inspectStatus;

    @ApiModelProperty("巡检状态title")
    @NameTitle(nameType = "ITEM",nameCode = "inspectStatus")
    private String inspectStatusTitle;


    /**
     * 检查人
     */
    @ApiModelProperty("检查人")
    private Long inspectOrderInspector;

    @ApiModelProperty("检查人名称")
    @NameTitle(nameType = "USER",nameCode = "inspectOrderInspector")
    private String inspectOrderInspectorName;

    @ApiModelProperty("受检人")
    private Long inspectOrderSubject;

    @ApiModelProperty("受检人名称")
    @NameTitle(nameType = "USER",nameCode = "inspectOrderSubject")
    private String inspectOrderSubjectName;

    /**
     * 工单生成时间
     */
    @ApiModelProperty("工单生成时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd" )
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private String inspectOrderGenerationTime;

    /**
     * 工单过期时间
     */
    @ApiModelProperty("工单过期时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd" )
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private String inspectOrderExpirationTime;

    @ApiModelProperty("巡检工单检查项目")
    private List<InspectOrderItem> inspectOrderItemList;

    @ApiModelProperty("检查问题")
    private String existProblem;

    @ApiModelProperty("整改截止日期")
    @DateTimeFormat(pattern = "yyyy-MM-dd" )
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date rectificationDeadline;

    @ApiModelProperty("历史流程")
    private List<InspectProcess> processHistory;

    @ApiModelProperty("受检人签字（图片）")
    private String inspectedPersonSignature;
}
